#include "Player.h"

unsigned char g_red[5] =	{255,	0,		0,		255,	0};
unsigned char g_green[5] =	{0,		0,		255,	255,	255};
unsigned char g_blue[5] =	{0,		255,	0,		0,		255};

unsigned int Player::m_player_count = 0;

Player::Player()
{
	m_player_number = m_player_count++;
	m_red = g_red[m_player_number];
	m_green = g_green[m_player_number];
	m_blue = g_blue[m_player_number];

	m_aim = 10;
}
Player::~Player()
{
}


void Player::reset()
{
	m_player_count = 0;
}


Vector2 Player::getAim()
{
	return Vector2(cos(m_aim*PI/180), sin(m_aim*PI/180));
}
int Player::getPlayerNumber()
{
	return m_player_number;
}
Object* Player::getPlanet()
{
	return m_planet;
}

unsigned char Player::getRed()
{
	return m_red;
}
unsigned char Player::getGreen()
{
	return m_green;
}
unsigned char Player::getBlue()
{
	return m_blue;
}

void Player::setColor(unsigned char p_red, unsigned char p_green, unsigned char p_blue)
{
	m_red = p_red;
	m_green = p_green;
	m_blue = p_blue;
}
void Player::setPlanet(Object *p_planet)
{
	m_planet = p_planet;
}

void Player::aim(double p_degrees)
{
	m_aim = p_degrees;
}
void Player::aimIP(double p_degrees)
{
	m_aim += p_degrees;
}

